package com.mx.project;

import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;

/**
 * 部署上线
 * 增加该类的目的是为了解析web.xml
 * 这个类需要和主启动类在同一个目录下
 */
public class ServletInitializer extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        //这里的DemoApplication是主启动类名
        return application.sources(ProjectApplication.class);
    }
}